{% load forum_tags %}
{% load accounts_tags %}


<div class="event">
    <div class="ui container">
        <div class="title"> Recent Votes</div>
        <div class="ui relaxed list">
            {% for vote in recent_votes %}
                <div class="item spaced">
                    <a href="{% url 'post_view' vote.post.uid %}">
                        <i class="{% vote_icon vote %} icon"></i> {{ vote.post.title }}</a>
                </div>
            {% endfor %}
        </div>
    </div>
</div>

<div class="ui divider"></div>

<div class="event">
    <div class="ui container">
        <div class="title">Recent Locations &bull;
            <a href="{% url "community_list" %}"> All <i class="ui angle small double right icon"></i></a>
        </div>
        <div class="ui relaxed list">

            {% for profile in recent_locations %}
                <div class="item spaced">
                        <span>
                        <a class="ui mini avatar thread-users list-avatar image"
                           href="{% url "user_profile" profile.uid %}">
                            <img src="{% gravatar user=profile.user size=90 %}">
                        </a>
                        </span>

                    {{ profile.location }}, <span class="muted">{{ profile.last_login|time_ago }}</span>
                </div>

            {% endfor %}
        </div>
    </div>
</div>

<div class="ui divider"></div>

<div class="event">
    <div class="ui container">
        <div class="title">Recent Awards &bull;
            <a href="{% url 'badge_list' %}">  All <i class="ui angle small double right icon"></i></a>
        </div>
        <div class="ui relaxed list">
            {% for award in recent_awards %}

                <div class="item">
                            <span>
                                <a href="{% url 'badge_view' award.badge.uid %}">
                                    <i class="{{ award.badge.icon }}"></i> {{ award.badge.name }}</a> to
                                <a href="{% url "user_profile" award.user.profile.uid %}">
                                    {{ award.user.profile.name }}</a>
                                <span>  {% user_icon user=award.user %}</span>
                            </span>
                </div>

            {% endfor %}
        </div>

    </div>
</div>

<div class="ui divider"></div>

<div class="event">
    <div class="ui container">
        <div class="title">Recent Replies</div>
        <div class="ui relaxed list">

            {% for replies in recent_replies %}

                <div class="item spaced">
                    <a href="{% url "post_view" replies.uid %}"> {{ replies.title }}</a>
                    by
                    <a href="{% url "user_profile" replies.author.profile.uid %}">{{ replies.author.profile.name }}
                    </a>

                    <span>  {% user_icon user=replies.author %}</span>

                    <div class="muted">
                        {{ replies.content |truncatechars:140 }}
                    </div>
                </div>

            {% endfor %}

        </div>
    </div>
</div>